<template>
  <div class="main-content1">
    <control-bar>
      <n-row gutter="20">
        <n-col :span="4">
          <n-date-picker
              v-model:value="searchTimeRange"
              :shortcuts="dateShortcuts"
              type="daterange"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
              clearable
          />
        </n-col>
        <n-col :span="3">
          <n-input v-model:value="searchKeywords" placeholder="请输入关键字"></n-input>
        </n-col>
        <n-col :span="3">
          <n-button type="primary" @click="getImgList">搜索</n-button>
        </n-col>
      </n-row>
    </control-bar>
    <main-content :height="60">
      <el-table :data="activeDataList">
        <el-table-column type="日志编号" width="50"></el-table-column>
        <!--<el-table-column label="系统模块" property="a1">-->
        <!--</el-table-column>-->
        <el-table-column label="操作名称" property="a2"> </el-table-column>
        <el-table-column label="操作人员" property="a3"> </el-table-column>
        <!--<el-table-column-->
        <!--    label="操作地址"-->
        <!--    width="220px"-->
        <!--    property="a4"-->
        <!--&gt;</el-table-column>-->
        <!--<el-table-column label="操作地点" property="a5">-->
        <!--</el-table-column>-->
        <el-table-column label="操作状态" property="a6">
        </el-table-column>
        <el-table-column label="操作时间" property="a7">
        </el-table-column>
        <el-table-column label="耗时" property="a8">
        </el-table-column>
        <el-table-column label="输入" property="a9">
          <template #default="scope">
            {{code1}}
          </template>
        </el-table-column>
        <el-table-column label="输出" property="a10">
          <template #default="scope">
            <el-button @click="handShowModel">查看</el-button>
          </template>
        </el-table-column>
        <!--<el-table-column label="操作" width="120px">-->
        <!--  <template #default="scope">-->
        <!--    <n-space>-->
        <!--      &lt;!&ndash; <mini-icon-button type="info" tooltip="编辑">-->
        <!--        <ActionIcon.Edit />-->
        <!--      </mini-icon-button> &ndash;&gt;-->
        <!--      <mini-icon-button-->
        <!--          type="info"-->
        <!--          tooltip="镶嵌线信息"-->
        <!--          @click="showSourceItem(scope.row)"-->
        <!--      >-->
        <!--        <ActionIcon.Polygon />-->
        <!--      </mini-icon-button>-->
        <!--      <mini-icon-button-->
        <!--          type="info"-->
        <!--          tooltip="查看"-->
        <!--          @click="showSourceItem(scope.row)"-->
        <!--      >-->
        <!--        <ActionIcon.View />-->
        <!--      </mini-icon-button>-->
        <!--      <mini-icon-button-->
        <!--          type="error"-->
        <!--          tooltip="删除"-->
        <!--          @click="deleteSourceItem(scope.row)"-->
        <!--      >-->
        <!--        <ActionIcon.Delete />-->
        <!--      </mini-icon-button>-->
        <!--    </n-space>-->
        <!--  </template>-->
        <!--</el-table-column>-->
      </el-table>
      <el-pagination
          v-model:current-page="pagination.current"
          @current-change="(value) => getImgList()"
          :page-size="pagination.size"
          :total="pagination.total"
      ></el-pagination>
      <el-dialog
          v-model="dialogVisible"
          :title="title"
          width="1000"
          :before-close="handleClose"
      >
        <div class="codeBox" style="height: 500px;overflow: auto">
          <n-code
              :code="code"
              language="javascript"
          />
        </div>

        <template #footer>
          <div class="dialog-footer">
            <el-button type="primary" @click="dialogVisible = false">
              关闭
            </el-button>
          </div>
        </template>
      </el-dialog>
    </main-content>
  </div>
</template>
<script setup lang="ts">
  import { ref } from "vue"
  import ControlBar from "@/components/common/ControlBar.vue";
  import MainContent from "@/components/common/MainContent.vue";
  let title = ref('查看')
  let dialogVisible = ref(false)
  const activeDataList = ref([
    {
      a1:'8075',
      a2: '元数据管理',
      a3: '张三',
      a4: '192.168.10.113',
      a5: '北京',
      a6: '成功',
      a7: '2024-08-24',
      a8: '14ms',
      a9: ''
    }, {
      a1:'8076',
      a2: '瓦片管理',
      a3: '张三',
      a4: '192.168.10.113',
      a5: '北京',
      a6: '成功',
      a7: '2024-08-24',
      a8: '14ms',
      a9: ''
    }
  ])
  const pagination = ref({
    total: 10,
    size:10
  })
  function handShowModel() {
    dialogVisible.value = true
  }
  function getImgList() {}
  function handleClose() {
    dialogVisible.value = false
  }
  const code1 = "/api/list"
  let code = ref('{\n' +
      '    "code": 0,\n' +
      '    "message": "执行成功",\n' +
      '    "data": [\n' +
      '        {\n' +
      '            "_id": "66cc5afb85d1714149c1e1d8",\n' +
      '            "subtaskid": "TASK_ImgRegistration_202408261837460983_0",\n' +
      '            "taskid": "TASK_ImgRegistration_202408261837460983",\n' +
      '            "startdate": "2024-08-26T10:37:47.000+00:00",\n' +
      '            "enddate": "2024-08-26T10:38:41.000+00:00",\n' +
      '            "state": "03",\n' +
      '            "insertdate": "2024-08-26T10:37:47.241+00:00",\n' +
      '            "flowid": null,\n' +
      '            "content": null,\n' +
      '            "processedParams": null,\n' +
      '            "process": 100,\n' +
      '            "pluginid": "ImgRegistration",\n' +
      '            "taketime": 108,\n' +
      '            "subTaskLog": null,\n' +
      '            "taskEndInfo": null,\n' +
      '            "inputfileName": "GF1_PMS1_E115.9_N39.7_20130810_L1A0000067836-PAN1.tiff",\n' +
      '            "procId": "0",\n' +
      '            "clusterId": "1580",\n' +
      '            "flowUiId": null,\n' +
      '            "exeJsonName": null,\n' +
      '            "isMonitor": "0",\n' +
      '            "tasktype": null,\n' +
      '            "startIp": "192.168.0.103",\n' +
      '            "startHostName": "DESKTOP-L8BB89J",\n' +
      '            "username": "admin",\n' +
      '            "imageType": "GF1"\n' +
      '        },\n' +
      '        {\n' +
      '            "_id": "66cc5afb85d1714149c1e1d9",\n' +
      '            "subtaskid": "TASK_ImgRegistration_202408261837460983_1",\n' +
      '            "taskid": "TASK_ImgRegistration_202408261837460983",\n' +
      '            "startdate": "2024-08-26T10:37:47.000+00:00",\n' +
      '            "enddate": "2024-08-26T10:38:43.000+00:00",\n' +
      '            "state": "03",\n' +
      '            "insertdate": "2024-08-26T10:37:47.242+00:00",\n' +
      '            "flowid": null,\n' +
      '            "content": null,\n' +
      '            "processedParams": null,\n' +
      '            "process": 100,\n' +
      '            "pluginid": "ImgRegistration",\n' +
      '            "taketime": 112,\n' +
      '            "subTaskLog": null,\n' +
      '            "taskEndInfo": null,\n' +
      '            "inputfileName": "GF1_PMS1_E116.0_N40.0_20130810_L1A0000067835-PAN1.tiff",\n' +
      '            "procId": "1",\n' +
      '            "clusterId": "1580",\n' +
      '            "flowUiId": null,\n' +
      '            "exeJsonName": null,\n' +
      '            "isMonitor": "0",\n' +
      '            "tasktype": null,\n' +
      '            "startIp": "192.168.0.103",\n' +
      '            "startHostName": "DESKTOP-L8BB89J",\n' +
      '            "username": "admin",\n' +
      '            "imageType": "GF1"\n' +
      '        }\n' +
      '    ]\n' +
      '}')
</script>

<!--<template>-->
<!--    <div class="struct-manage-page">-->
<!--        &lt;!&ndash; <gz-header-->
<!--            title="重点目标本底数据采集模块"-->
<!--            style="z-index: 5"></gz-header> &ndash;&gt;-->
<!--        <el-dialog title="添加分类" v-model="showAddCatalogDlg">-->
<!--            <el-form label-position="top">-->
<!--                <el-form-item label="名称">-->
<!--                    <el-input v-model="addCatalogModel.name"></el-input>-->
<!--                </el-form-item>-->
<!--                <el-form-item label="父类别">-->
<!--                    <el-input-->
<!--                        disabled-->
<!--                        v-model="addCatalogModel.parent_name"></el-input>-->
<!--                    &lt;!&ndash; <el-select></el-select> &ndash;&gt;-->
<!--                </el-form-item>-->
<!--                <el-form-item label="图标">-->
<!--                    &lt;!&ndash; <el-input v-model="addCatalogModel.icon"></el-input> &ndash;&gt;-->
<!--                    <symbol-select-->
<!--                        v-model="addCatalogModel.icon"></symbol-select>-->
<!--                    &lt;!&ndash; <el-select></el-select> &ndash;&gt;-->
<!--                </el-form-item>-->
<!--            </el-form>-->
<!--            <template #footer>-->
<!--                <el-button type="primary" @click="handleAddCatalog">-->
<!--                    确定-->
<!--                </el-button>-->
<!--            </template>-->
<!--        </el-dialog>-->
<!--        <el-dialog title="编辑分类" v-model="showEditCatalogDlg">-->
<!--            <el-form label-position="top">-->
<!--                <el-form-item label="名称">-->
<!--                    <el-input v-model="editCatalogModel.name"></el-input>-->
<!--                </el-form-item>-->
<!--                <el-form-item label="父类别">-->
<!--                    <el-input-->
<!--                        disabled-->
<!--                        v-model="editCatalogModel.parent_name"></el-input>-->
<!--                    &lt;!&ndash; <el-select></el-select> &ndash;&gt;-->
<!--                </el-form-item>-->
<!--                <el-form-item label="图标">-->
<!--                    &lt;!&ndash; <el-input v-model="editCatalogModel.iconUrl"></el-input> &ndash;&gt;-->
<!--                    <symbol-select-->
<!--                        v-model="editCatalogModel.icon"></symbol-select>-->
<!--                </el-form-item>-->
<!--                &lt;!&ndash; <el-form-item label="扩展字段">-->
<!--                    <el-input v-model="editCatalogModel.extra"></el-input>-->
<!--                </el-form-item> &ndash;&gt;-->
<!--            </el-form>-->
<!--            <template #footer>-->
<!--                <el-button type="primary" @click="handleEditCatalog"-->
<!--                    >确定</el-button-->
<!--                >-->
<!--            </template>-->
<!--        </el-dialog>-->
<!--        <main-content>-->
<!--            &lt;!&ndash; 1123  &ndash;&gt;-->
<!--            <n-row class="fullWH">-->
<!--                <n-col :span="5" class="side">-->
<!--                    <catalog-tree-->
<!--                        show-add-->
<!--                        show-edit-->
<!--                        show-delete-->
<!--                        :data="tree_data"-->
<!--                        :loading="treeLoading"-->
<!--                        @add="handleShowAddCatalog"-->
<!--                        @edit="handleShowEditCatalog"-->
<!--                        @delete="handleDeleteCatalog"-->
<!--                        @click="handleTreeClick"></catalog-tree>-->
<!--                </n-col>-->
<!--                <n-col :span="19" style="height: 100%">-->
<!--                    &lt;!&ndash; <monaco-editor-->
<!--                            v-model:value="code"-->
<!--                            language="json"></monaco-editor> &ndash;&gt;-->
<!--                    <n-card style="height: 100%">-->
<!--                        <n-tabs-->
<!--                            style="height: 100%"-->
<!--                            pane-style="height:calc(100% - 20px);overflow-y:hidden;">-->
<!--                            <n-tab-pane name="基础字段">-->
<!--                                <el-row>-->
<!--                                    <el-space-->
<!--                                        direction="vertical"-->
<!--                                        fill-->
<!--                                        style="width: 100%">-->
<!--                                        <n-alert type="info">-->
<!--                                            基础字段不可更改-->
<!--                                        </n-alert>-->
<!--                                        <el-descriptions-->
<!--                                            style="width: 100%"-->
<!--                                            border-->
<!--                                            :column="1"-->
<!--                                            direction="vertical">-->
<!--                                            <el-descriptions-item label="名称">-->
<!--                                                字符串-->
<!--                                            </el-descriptions-item>-->
<!--                                            <el-descriptions-item-->
<!--                                                label="分类名称">-->
<!--                                                字符串-->
<!--                                            </el-descriptions-item>-->
<!--                                            <el-descriptions-item label="坐标">-->
<!--                                                数组-->
<!--                                            </el-descriptions-item>-->
<!--                                            <el-descriptions-item label="图标">-->
<!--                                                字符串-->
<!--                                            </el-descriptions-item>-->
<!--                                        </el-descriptions>-->
<!--                                    </el-space>-->
<!--                                </el-row>-->
<!--                            </n-tab-pane>-->
<!--                            <n-tab-pane name="扩展字段">-->
<!--                                <FormDesigner-->
<!--                                    :rule="curSchema"-->
<!--                                    @submit="handleSubmitSchema"></FormDesigner>-->
<!--                            </n-tab-pane>-->
<!--                        </n-tabs>-->
<!--                    </n-card>-->
<!--                </n-col>-->
<!--            </n-row>-->
<!--        </main-content>-->
<!--    </div>-->
<!--</template>-->

<!--<script setup lang="ts">-->
<!--import MainContent from '@/components/common/MainContent.vue'-->
<!--import CatalogTree from '@/components/common/CatalogTree.vue'-->
<!--import FormDesigner from '@/components/common/FcForm/FormDesigner.vue'-->
<!--import { onMounted, ref } from 'vue'-->
<!--import { ICatalog } from '@/types/keyobject'-->
<!--import { useCatalogTree, useKeyObjectStruct } from '@/hooks'-->
<!--import SymbolSelect from '@/components/common/SymbolSelect.vue'-->

<!--const code = ref('')-->

<!--const {-->
<!--    tree_data,-->
<!--    // add-->
<!--    addCatalogModel,-->
<!--    handleAddCatalog,-->
<!--    showAddCatalogDlg,-->
<!--    handleShowAddCatalog,-->
<!--    // delete-->
<!--    handleDeleteCatalog,-->

<!--    // edit-->
<!--    handleEditCatalog,-->
<!--    editCatalogModel,-->
<!--    showEditCatalogDlg,-->
<!--    handleShowEditCatalog,-->
<!--    // list-->
<!--    getCatalogList,-->
<!--    treeLoading,-->

<!--    // tree-->
<!--    handleTreeClick,-->
<!--    curCatalog,-->
<!--    curCatalogId,-->
<!--    curCatalogName,-->

<!--    // submit-->
<!--    handleSubmitSchema,-->
<!--    curSchema,-->
<!--} = useCatalogTree()-->

<!--// const { handleSubmitSchema } = useKeyObjectStruct()-->

<!--onMounted(async () => {-->
<!--    const res = await getCatalogList()-->

<!--    curCatalog.value = res-->
<!--})-->

<!--// const {-->

<!--// } = useKeyObjectStruct()-->
<!--</script>-->

<!--<style lang="scss" scoped>-->
<!--@use '/src/assets/scss/main.scss' as *;-->

<!--.struct-manage-page {-->
<!--    width: 100%;-->
<!--    height: 100%;-->
<!--    position: relative;-->

<!--    .main-content {-->
<!--        position: absolute;-->
<!--        bottom: 0;-->
<!--        width: 100%;-->
<!--        height: calc(100%);-->
<!--        .side {-->
<!--            background-color: $c-gray-8;-->
<!--            height: 100%;-->
<!--        }-->
<!--    }-->
<!--}-->
<!--</style>-->
